#ifndef ZNDEVICEBASE_H
#define ZNDEVICEBASE_H

#include <QObject>
#include <qthread.h>
#include <qcoreevent.h>


class ZNDeviceWork;
class ZNDeviceBase : public QObject
{
    Q_OBJECT
public:
    explicit ZNDeviceBase(QString name, ZNDeviceWork* work, QObject *parent = nullptr);
    virtual ~ZNDeviceBase();
signals:

public slots:

private:
    ZNDeviceWork* work;
    QThread *thread;
};

class ZNDeviceWork : public QObject
{
    Q_OBJECT

public:
    ZNDeviceWork();
    virtual ~ZNDeviceWork();
    virtual void moveToThread(QThread* thread);
public slots:


protected:
    void timerEvent(QTimerEvent* event);

public:
    QString name = "";
protected:
    int baseTimerID = -1;

};

#endif // ZNDEVICEBASE_H
